<template>
  <div>
    <div class="m-carto-empty">
      <img src="./img/icon_cart.png" v-if="isShowCart">
      <img src="./img/icon_order_two.png" v-else>
      <div v-if="isShowCart" class="empty-text">您的购物车是空的</div>
      <div v-else class="empty-text">还没有相关订单</div>
    </div>
  </div>
</template>

<script>
  import {mapGetters} from 'vuex'
  export default {
    props: {
      isShowCart: Boolean
    }
  }
</script>

<style lang="scss">
  .m-carto-empty {
    padding-top: 10%;
    border-top: 1px solid #ccc;
    text-align: center;
    background-color: #fff;
    .empty-text {
      padding: 0.5rem 0;
      font-size: 0.4rem;
    }
    img {
      display: inline-block;
      width: 1.8rem;
      height: 1.8rem;
    }
    button {
      width: 2.3rem;
      height: .7rem;
      margin-top: .5rem;
      border: 1px solid #ef52a3;
      color: #ef52a3;
      border-radius: 6px;
      font-size: .28rem;
    }
  }
</style>